package com.uton.rfidcontroller.common.net;

import com.uton.rfidcontroller.model.CarDealerDetailModel;
import com.uton.rfidcontroller.model.CarDealerListModel;
import com.uton.rfidcontroller.model.CarDealerListWriteInModel;
import com.uton.rfidcontroller.model.CarDealerPatrolDetailModel;
import com.uton.rfidcontroller.model.CarDetailModel;
import com.uton.rfidcontroller.model.CarListModel;
import com.uton.rfidcontroller.model.DetailsModel;
import com.uton.rfidcontroller.model.LoginModel;
import com.uton.rfidcontroller.model.MerchantInfoModel;
import com.uton.rfidcontroller.model.ScanCarDetailModel;
import com.uton.rfidcontroller.model.base.BaseModel;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.POST;

/**
 * Created by 王家宝 on 2017/8/30.
 * Email:639586819@qq.com
 * Tel:18241150668
 */

public interface RetrofitService {

    /**
     * 登录
     *
     * @param map
     * @return
     */
    @POST("sys/login")
    Observable<BaseModel<LoginModel>> login(
            @Body Map<String, Object> map);


    /**
     * 退出登录
     *
     * @param map
     * @return
     */
    @POST("sys/logout")
    Observable<BaseModel<String>> logout(
            @Body Map<String, Object> map);


    /**
     * 忘记密码
     *
     * @param map
     * @return
     */
    @POST("sys/forgotPassword")
    Observable<BaseModel<String>> forgotPassword(
            @Body Map<String, Object> map);


    /**
     * 获取短信验证码
     *
     * @param map
     * @return
     */
    @POST("sys/querySMSCode")
    Observable<BaseModel<String>> querySMSCode(
            @Body Map<String, Object> map);


    /**
     * 验证短信验证码
     *
     * @param map
     * @return
     */
    @POST("sys/verifySMSCode")
    Observable<BaseModel<String>> verifySMSCode(
            @Body Map<String, Object> map);


    /**
     * 查询巡检车行列
     * 调试成功 2017年9月29日15:33:17
     * @param map
     * @return
     */
    @POST("patrol/carDealerList")
    Observable<BaseModel<List<CarDealerListModel>>> carDealerList(
            @Body Map<String, Object> map);


    /**
     * 车行巡检详情
     *
     * @param map
     * @return
     */
    @POST("patrol/carDealerPatrolDetail")
    Observable<BaseModel<List<CarDealerPatrolDetailModel>>> carDealerPatrolDetail(
            @Body Map<String, Object> map);


    /**
     * 车行详情
     *
     * @param map
     * @return
     */
    @POST("dealer/carDealerDetail")
    Observable<BaseModel<CarDealerDetailModel>> carDealerDetail(
            @Body Map<String, Object> map);


    /**
     * 车辆详情
     *
     * @param map
     * @return
     */
    @POST("dealer/carDetail")
    Observable<BaseModel<CarDetailModel>> carDetail(
            @Body Map<String, Object> map);


    /**
     * 车辆详情
     *
     * @param map
     * @return
     */
    @POST("patrol/scanCarDetail")
    Observable<BaseModel<ScanCarDetailModel>> scanCarDetail(
            @Body Map<String, Object> map);


    /**
     * 提交巡检结果
     *
     * @param list
     * @return
     */
    @POST("patrol/submitInspectionResults")
    Observable<BaseModel<String>> submitInspectionResults(
            @Body List list);


    /**
     * 写入标签车行列表
     *
     * @param map
     * @return
     */
    @POST("writeIn/carDealerList")
    Observable<BaseModel<List<CarDealerListWriteInModel>>> carDealerWriteInList(
            @Body Map<String, Object> map);


    /**
     * 录入车辆列表
     *
     * @param map
     * @return
     */
    @POST("writeIn/carList")
    Observable<BaseModel<List<CarListModel>>> carListWriteIn(
            @Body Map<String, Object> map);


    /**
     * 写入标签提交
     *
     * @param map
     * @return
     */
    @POST("writeIn/submitWriteIn")
    Observable<BaseModel<String>> submitWriteIn(
            @Body Map<String, Object> map);


    @POST("dealer/merchant/queryMerchantInfo")
    Observable<BaseModel<List<MerchantInfoModel>>> queryMerchantInfo(
            @Body Map<String, String> map);

    @POST("dealer/assess/getAssessmentDetails")
    Observable<BaseModel<DetailsModel>> queryDetails(
            @Body Map<String, String> map);


    @POST("dealer/carMessage/getCarMessage")
    Observable<BaseModel<List<CarListModel>>> queryCarList(
            @Body Map<String, Object> map);


}
